/////////////////////////////////////////////////////////////////////////
//
// Amuse Engine - application
// Copyright (c) 2014.  All Rights Reserved
//
// File:		AEPlatformAndroid.h
// Author:		Gianluca Belardelli
// Date:		18/10/2013
//
/////////////////////////////////////////////////////////////////////////
#ifndef _AEPLATFORMANDROID_H_
#define _AEPLATFORMANDROID_H_

#define AE_PLATFORM_TYPE "ANDROID"

#include <jni.h>
#include <string.h>
#include <sys/time.h>
#include <time.h>
#include <android/log.h>
#include <stdint.h>
#include <signal.h>
#include <pthread.h>
#include <stdio.h>
#include <unistd.h> 
#include <semaphore.h>

#define GL_GLEXT_PROTOTYPES

#include <EGL/egl.h>
#include <GLES/gl.h>

typedef void *AEWINDOWHANDLE;
typedef pthread_t AETHREADHANDLE;
typedef pthread_mutex_t AECRITICALSECTION;
typedef sem_t AESEMAPHOREHANDLE;
typedef sem_t *AELPSEMAPHOREHANDLE;
typedef void *AEHANDLE;

//#include <core/system/io/platform/android/AEAndroidFileSystem.h>

//typedef AEAndroidFileSystem AENATIVEFILESYSTEM;
//typedef AEAndroidFileSystem *LPAENATIVEFILESYSTEM;

typedef time_t	AETIMESTRUCT64;

#define AETIMEFUNC	time
#define AEGMTIMEFUNC	gmtime
#define AELOCALTIMEFUNC	localtime

#define INTERLOCKED_CMPXCHG(var, _old, _new) __sync_val_compare_and_swap( (int*)&var, _old, _new )
#endif
// _AEPLATFORMANDROID_H_
